﻿<!--*************************************************************************************

   Toolkit for WPF

   Copyright (C) 2007-2016 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license 

   For more features, controls, and fast professional support,
   pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/

   Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

  *************************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridSelectedObjectView"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
                xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
                xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                xmlns:s="clr-namespace:System;assembly=mscorlib"
                VerticalScrollBarVisibility="Disabled"
                Title="Using SelectedObject(s)">
    <local:DemoView.Description>
        <Paragraph FontSize="14" FontFamily="Segoe">
         When setting the SelectedObject property to an instance of an item, you can modify the values of the object properties.
      </Paragraph>
    </local:DemoView.Description>

   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition />
      </Grid.RowDefinitions>
      <StackPanel Grid.Row="0" Margin="20">
         <TextBlock Text="Focus the element to inspect with the propertyGrid." 
                    TextWrapping="Wrap"/>
      </StackPanel>

      <!-- 
      PropertyNameBinding will be used to determine the property name display text.
      The value displayed will be specified through the DefaultEditorDefinition.
      -->
      <Grid Grid.Row="1">
         <Grid.ColumnDefinitions>
            <ColumnDefinition MinWidth="150" Width="*" />
            <ColumnDefinition MaxWidth="530" Width="2.5*"/>
         </Grid.ColumnDefinitions>
         <StackPanel Grid.Column="0" >
            <Button Content="Button" Margin="20" GotFocus="OnControlGetFocus" />
            <TextBox Text="TextBox" Margin="20" GotFocus="OnControlGetFocus"/>
            <CheckBox Content="CheckBox" Margin="20" GotFocus="OnControlGetFocus"/>
         </StackPanel>
            <!-- The SelectedObject property will be assigned in code-behind when one
         of the 3 controls receives focus. -->
         <xctk:PropertyGrid x:Name="_propertyGrid" Grid.Column="1" HorizontalAlignment="Stretch" />
      </Grid>
   </Grid>
</local:DemoView>
